﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Summerset.Isbndb
{
    /// <summary>
    /// Event args that are passed with a page loaded event.
    /// </summary>
    public sealed class PageLoadedEventArgs : EventArgs
    {
        /// <summary>
        /// Initializes a new instance of <see cref="PageLoadedEventArgs"/>, where an exception was not encountered.
        /// </summary>
        public PageLoadedEventArgs() 
        {

        }
        
        /// <summary>
        /// Initializes a new instance of <see cref="PageLoadedEventArgs"/>, where an exception was encountered.
        /// </summary>
        /// <param name="Exception">A reference to the exception that was encountered.</param>
        public PageLoadedEventArgs(Exception Exception)
        {
            this.Exception = Exception;
        }

        /// <summary>
        /// Gets the exception that was encountered while loading the page.
        /// This value may be null if no exception was encountered.
        /// </summary>
        public Exception Exception { get; private set; }     

    }
}
